﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace BbsbWebService.Classes
{
    [DataContract]
    public class ServerItem
    {
        [DataMember]
        public string ComputerName { get; set; }

        [DataMember]
        public int Port { get; set; }

        public string ToBbsbServiceAddress()
        {
            return string.Format(@"http://{0}:{1}/bbsbservice", ComputerName, Port);
        }

        public string ToBbsbUpdateAddress()
        {
            return string.Format(@"http://{0}:{1}/bbsbupdateservice", ComputerName, Port + 1);
        }
    }
}
